
<%@ page import="com.cisite.cont.Content" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'content.label', default: '内容查看页面')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<div id="show-content" class="content scaffold-show" role="main">
			<g:if test="${flash.message}">
			   <div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list content">
			
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'topLevel', 'error')} required">
					<label for="topLevel">
						<g:message code="content.topLevel.label" default="固顶级别" />
					</label>
					<g:field type="number" name="topLevel" required="" value="${fieldValue(bean: contentInstance, field: 'topLevel')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'typeImg', 'error')} required">
					<label for="typeImg">
						<g:message code="content.typeImg.label" default="类型图片" />
					</label>
					<g:field type="number" name="typeImg" required="" value="${fieldValue(bean: contentInstance, field: 'typeImg')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'title', 'error')} ">
					<label for="title">
						<g:message code="content.title.label" default="标题" />
						
					</label>
					<g:textField name="title" value="${contentInstance?.title}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'titleColor', 'error')} ">
					<label for="titleColor">
						<g:message code="content.titleColor.label" default="标题颜色" />
					</label>
					<g:textField name="titleColor" value="${contentInstance?.titleColor}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'shortTile', 'error')} ">
					<label for="shortTile">
						<g:message code="content.shortTile.label" default="简短标题" />
						
					</label>
					<g:textField name="shortTile" value="${contentInstance?.shortTile}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'author', 'error')} ">
					<label for="author">
						<g:message code="content.author.label" default="作者" />
						
					</label>
					<g:textField name="author" value="${contentInstance?.author}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'originUrl', 'error')} ">
					<label for="originUrl">
						<g:message code="content.originUrl.label" default="来源链接" />
						
					</label>
					<g:textField name="originUrl" value="${contentInstance?.originUrl}"/>
				</div>
				
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'description', 'error')} ">
					<label for="description">
						<g:message code="content.description.label" default="描述" />
					</label>
					<g:textField name="description" value="${contentInstance?.description}"/>
				</div>
				
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'tplCont', 'error')} ">
					<label for="tplCont">
						<g:message code="content.tplCont.label" default="指定模版" />
					</label>
					<g:select name="tplCont" optionKey="tplCont" optionValue="queryShow"
				       from="${[[tplCont:'1',queryShow:"一级模版"],[tplCont:'2',queryShow:"二级模版"]]}"  value="${fieldValue(bean: channelInstance, field: 'tplCont')}" >
				    </g:select>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'hasRecommend', 'error')} required">
					<label for="hasRecommend">
						<g:message code="content.hasRecommend.label" default="是否推荐" />
					</label>
					<g:checkBox name="hasRecommend" checked="${contentInstance?.hasRecommend}" value="1"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'isBold', 'error')} required">
					<label for="isBold">
						<g:message code="content.isBold.label" default="是否加粗" />
					</label>
					<g:checkBox name="isBold" checked="${contentInstance?.isBold}" value="1"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'isCheck', 'error')} required">
					<label for="isCheck">
						<g:message code="content.isCheck.label" default="是否审核" />
					</label>
				    <g:checkBox name="isCheck" checked="${contentInstance?.isCheck}" value="1"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'isTitleImg', 'error')} required">
					<label for="isTitleImg">
						<g:message code="content.isTitleImg.label" default="是否有标题图" />
					</label>
					<g:checkBox name="isTitleImg" checked="${contentInstance?.isTitleImg}" value="1"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: contentInstance, field: 'needRegenerate', 'error')} required">
					<label for="needRegenerate">
						<g:message code="content.needRegenerate.label" default="是否生成静态文件" />
					</label>
				   <g:checkBox name="needRegenerate" checked="${contentInstance?.needRegenerate}" value="1"/>
				</div>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${contentInstance?.id}" />
					<g:link class="edit" action="edit" id="${contentInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
